<template>
    <div>
        LIST

        <router-link to="/home?a=1&b=2">home</router-link>
        <router-link :to="{path:'/home',query:obj}">home</router-link>
        <button @click="fn">跳转到home</button>
    </div>
</template>
<script>
// @ is an alias to /src
export default {
    name: 'list',
    data() {
        return {
          obj:{
            name:"朱云峰",
            age:12
          }
        }
    },
    created() {
      console.log(this.$route)
    },
    methods: {
        fn(){
          setTimeout(() => {
            this.$router.replace('/home')
          }, 1000);
        }
    }
}
</script>
<style lang="less">

</style>